This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 11-269262, filed Sep. 22, 1999, the entire contents of which are incorporated herein by reference.
This invention relates to an image processing method and image processing apparatus for processing input image data obtained by reading a document to obtain preset output data and an image forming apparatus such as a digital copying machine using the image processing apparatus.
Generally, in a image forming apparatus such as a digital copying machine for outputting an image obtained by reading a document by use of a scanner, a function for automatically changing the image processing methods for image data obtained by use of the scanner is provided so that a color image will be output if the read document is a color document and a monochrome image will be output if the read document is a monochrome document.
The process for determining whether the document is a color document or monochrome document is called ACS (Automatic Color Selection) determination. The ACS determination is generally made by effecting the color/monochrome identifying process for input image data containing a plurality of primary color component signals such as RGB signals for each pixel, counting the results of identification of color/monochrome and checking the ratios of the respective counts to the whole number of pixels in the document size area.
The ACS determination is normally effected by the pre-scanning operation prior to the original process which is to be effected in the image processing apparatus, and then the original process is effected by the main scanning operation after the internal processing mode is changed according to the result of determination.
In the image forming apparatus such as the digital copying machine, an automatic density adjusting function for automatically adjusting the density of an output image according to the type of a document to an optimum value is generally provided. For the automatic density adjustment, a histogram indicating the frequency of occurrence of respective density levels of the document image is formed and a reference value for density adjustment is calculated corresponding to the histogram. In order to reduce the processing time, it is desirable to simultaneously effect calculation of the reference value and formation of the histogram for the ACS determination and automatic density adjustment at the time of pre-scanning.
Histogram forming methods are generally different in the cases of a color document and a monochrome document. If it is previously known that the document is a color document or monochrome document and the color processing mode or monochrome processing mode is set according to the color document or monochrome document to be used, the automatic density adjusting operation can be properly effected by forming a histogram based on the set processing mode and deriving an adequate reference value.
However, if the automatic density adjusting operation is effected according to the result of the ACS determination while the processing mode is not set according to whether the document is a color document or monochrome document, an unsuitable histogram may be formed in some cases since a read document does not always correspond to the processing mode.
For example, in a case where image data obtained by reading a color document is input while the color processing mode is set, a histogram for the color image is adequately formed and a reference value for the automatic density adjustment derived based on the histogram becomes adequate. On the other hand, in a case where image data obtained by reading a monochrome document is input while the color processing mode is set, a histogram for a color image is formed and a reference value derived based on the histogram becomes inadequate for the automatic density adjustment for the monochrome document.
Therefore, in the conventional image forming apparatus such as the digital copying machine, if the set processing mode is different from the result of ACS determination, a histogram which corresponds to the result of ACS determination is formed by effecting the pre-scanning operation again and a reference value for the automatic density adjustment which corresponds to the read document is derived based on the histogram. Therefore, in this case, it is necessary to effect the pre-scanning operation twice, thereby increasing the processing time and, for example, in the digital copying machine, it takes a long time from the time the document is set and a copying button is depressed until the time an output image is obtained.
As described above, in the conventional image forming apparatus, an adequate reference value can be derived for the automatic density adjustment by use of the histogram formed when the set processing mode corresponds to the result of ACS determination, but in a case where the set processing mode does not correspond to the result of ACS determination, it is necessary to effect the pre-scanning operation again, form a histogram and derive a reference value for the automatic density adjustment based on the histogram, and as a result, the pre-scanning operation must be effected twice in total, thereby increasing the processing time.
An object of this invention is to provide an image processing apparatus, image processing method, image forming apparatus and image forming method in which ACS determination can be made and, at the same time, a reference value for automatic density adjustment can be obtained by always effecting a pre-scanning operation only once while the processing time can be prevented from being increased by effecting a second pre-scanning operation even when a set processing mode does not correspond to the result of ACS determination.
The above object can be attained by an image data processing apparatus comprising determining means for determining whether input image data supplied is a color image mode or monochrome image mode; histogram forming means for forming a histogram indicating the frequency of occurrence of density levels for each of a plurality of color component signals based on the input image data; reference value calculating means for calculating a first reference value for density adjustment for the color image mode based on the histogram formed by the histogram forming means; reference value converting means for converting the first reference value for the color image mode into a second reference value for the monochrome image mode and outputting the second reference value; and density adjusting means for adjusting the density of the input image data by using the first reference value when the determining means determines that the input image data is the color image mode and using the second reference value output from the reference value converting means when the determining means determines that the input image data is the monochrome image mode and then outputting output image data.
As described above, the image processing apparatus according to this invention forms the histogram in parallel with the determination of the input image data and forms the (first) reference value based on the thus formed histogram. Then, if the input image data is the color image mode, the reference value is used as it is and if it is the monochrome image mode, the conversion process is effected to convert the (first) reference value into the (second) reference value for the monochrome image mode.
In the prior art, when it is determined that the reference value of a different image mode is obtained, the operation for fetching document image information by pre-scanning the document again if it is used as a digital copying machine, for example, and re-forming a reference value for the different image mode is effected so that the processing time will become long. However, in this invention, for example, a conversion table is formed, the reference value converting process is effected when it is determined that the reference value for the different image mode is obtained, and therefore, it becomes unnecessary to effect a process such as the second pre-scanning process for the document which takes a long period of time. As a result, a rapid and stable image density adjustment process can be effected and if it is used in an image forming apparatus, a rapid copying process can be attained without paying any attention to the color document image or monochrome document image.
In this invention, a method for forming a CMY-K conversion table used for the reference value conversion is explained in detail and it is possible to stably effect the process for converting the reference value between the color image mode and the monochrome image mode.
Further, in this invention, not only the above-described image processing apparatus but also the image forming apparatus, image processing method and image forming method are explained.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter.